package com.kangye.learnteacher.mapper;

import com.kangye.learnteacher.entity.QuestionBank;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * @program: learndeduo
 * @description: 老师端题库mapper接口
 * @author: 苗伟晨
 * @create: 2021-05-17 17:41
 **/
@Mapper
@Repository
public interface QuestionBankMapper {
    /**
     *查询全部题目
     * */
    public List<Map<String,Object>> queryAllQuestionBank(Integer qb_id,String subject_name,Integer gradeId,String type_name);

    /**
     * 删除功能
     * */
    public Integer deleteById(Integer qb_id);

    /**
     * 查询题型
     * */
    public List<QuestionBank> querySubject(QuestionBank questionBank);

    /**
     * 根据id查询数据
     * */
    public List<Map<String,Object>> queryById(Integer qb_id);

    /**
     * 修改题库信息
     * */
    public Integer modifyQb(Integer qb_id,String qb_name,double qb_score,Integer qb_difficulty,String qb_answer,Integer qb_subjectId,Integer qb_gradeId,Integer qb_questionId);

    /**
     * 插入单条数据
     * */
    Integer insert(QuestionBank questionBank);
}